package com.dsw.demo.rabbitmq.service;

import com.dsw.demo.rabbitmq.config.FanoutRabbitMQConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class FanoutReceiver {
    @RabbitListener(queues = FanoutRabbitMQConfig.FANOUTQUEUEA)
    public void fanoutReceiverA(String msg) {
        System.out.println("fanout queue a message:" + msg);
    }

    @RabbitListener(queues = FanoutRabbitMQConfig.FANOUTQUEUEB)
    public void fanoutReceiverB(String msg) {
        System.out.println("fanout queue b message:" + msg);
    }


    @RabbitListener(queues = FanoutRabbitMQConfig.FANOUTQUEUEC)
    public void fanoutReceiverC(String msg) {
        System.out.println("fanout queue c message:" + msg);
    }


}
